<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>


<input id="udt" hidden="true" value="${userRole}">

<script>
$(document).ready(function(){
	
	var a = $("#udt").prop("value");
	
	//alert(a);
	
	
	if(a == ""){
		//alert("Admin");	
		
		$("#applyLeaveId").hide();
		$("#applyLeaveListId").hide();
		$("#leaveHistoryId").hide();
		
		
		
	}else if(a=="Employee"){
		//alert("Employee");	
		
		$("#employeeCreateId").hide();
		$("#employeeListId").hide();
		$("#leaveTypeListId").hide();
		$("#PublicHolidayCreateId").hide();
		$("#PublicHolidayListId").hide();
		$("#UserDetailCreateId").hide();
		$("#UserDetailListId").hide();
		$("#applyLeaveListId").hide();
		$("#userDetailCreateId").hide();
		$("#userDetailListId").hide();
		
		
	}else if (a == "Manager") {
		//alert("Manager");
		
		$("#employeeCreateId").hide();
		$("#employeeListId").hide();
		$("#leaveTypeListId").hide();
		$("#PublicHolidayCreateId").hide();
		$("#PublicHolidayListId").hide();
		$("#UserDetailCreateId").hide();
		$("#UserDetailListId").hide();
		$("#userDetailCreateId").hide();
		$("#userDetailListId").hide();
		
	}
	
	
	  $("").click(function(){
		  
		  
	    $(this).hide();
	  });
}); 


</script>



<div class="col-md-2">
	<ul class="nav navbar-fixed">
		<li><a id="employeeCreateId"
			href="${pageContext.request.contextPath}/employee/create.html">Create
				an Employee </a></li>
		<li><a id="PublicHolidayCreateId"
			href="${pageContext.request.contextPath}/Publicholiday/create.html">Create
				a Public Holiday</a></li>
		<li><a id="leaveTypeListId"
			href="${pageContext.request.contextPath}/LeaveType/list.html">View
				Leave Types</a></li>
		<li><a id="PublicHolidayListId"
			href="${pageContext.request.contextPath}/Publicholiday/list.html">View
				Public Holidays</a></li>
		
		<li><a id="employeeListId"
			href="${pageContext.request.contextPath}/employee/list.html">View all Employee</a></li>
			
			<li><a id="applyLeaveId"
			href="${pageContext.request.contextPath}/LeaveDetail/create.html">Apply
				Leave</a></li>
		<li><a id="leaveHistoryId"
			href="${pageContext.request.contextPath}/LeaveDetail/list.html">View
				Leave History</a></li>
		<li><a id="applyLeaveListId"
			href="${pageContext.request.contextPath}/LeaveDetail/Approvelist.html">Application
				list for Approval</a></li>
				
				<li><a id="userDetailCreateId"
			href="${pageContext.request.contextPath}/userdetail/create.html">Create User</a></li>
				
				<li><a id="userDetailListId"
			href="${pageContext.request.contextPath}/userdetail/list.html">View All Users </a></li>
			<li>
			<a href="${pageContext.request.contextPath}/logout">(Logout)</a></li>
				
	</ul>
</div>